// pages/manage/propaganda/propagandaDetail/propagandaDetail.js
const app=getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    url: ""
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.data.id = options.id;
    this.data.deptId = app.globalData.deptId;
    let deptId = options.deptId || app.globalData.deptId
    let url = app.getUrl('/xcx/education/queryDeptEducationDetail') + "?id=" + options.id + "&deptId=" + deptId
    if (deptId == "xaefynewJCEBdept001" || deptId == "myszxyyzfdept001") {
      url = 'https://xcx.bb-care.com/bbcareDeploy/xcx/education/queryDeptEducationDetail' + "?id=" + options.id + "&deptId=" + deptId
    }
    this.setData({
      url:url
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function (options) {
    // console.log(options)
  },
  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
    // console.log(`/pages/manage/propaganda/propagandaDetail/propagandaDetail?id=${ this.data.id }&deptId=${ this.data.deptId }`)
    // return {
    //   query: `/pages/manage/propaganda/propagandaDetail/propagandaDetail?id=${ this.data.id }&deptId=${ this.data.deptId }`
    // }
  }
})